<?php
defined('BY_JYA') or exit('error');
$_RQ['op']=$_RQ['op']?$_RQ['op']:'basic';
$return=array();
if($_RQ['op']=='basic'){
	if($_RQ['postdata']){
		$postdata=get_postdata();
		$this->plugin_setting('basic',$postdata);
		exi('设置成功');
	}
	$footernav =array(
		array('title'=>'首页','icon'=>'icon-shouye','action'=>'jy_jdpm/index/'),
		array('title'=>'分类','icon'=>'icon-navlist','action'=>'jy_jdpm/cate/'),
		array('title'=>'专场','icon'=>'icon-hot','action'=>'jy_jdpm/special.index/'),
		array('title'=>'我的','icon'=>'icon-wo1','action'=>'jy_jdpm/member.index/'),
	);
	$cube =array(
		array('title'=>'首页','image'=>'../core/resource/images/diy/default/cube-1.jpg','action'=>''),
		array('title'=>'全部','image'=>'../core/resource/images/diy/default/cube-2.jpg','action'=>''),
		array('title'=>'订单','image'=>'../core/resource/images/diy/default/cube-3.jpg','action'=>''),
		array('title'=>'我的','image'=>'../core/resource/images/diy/default/cube-4.jpg','action'=>''),
	);
	
	$plugins =$this->plugins();
	$return['item']=$this->plugin_setting('basic');
	$return['item']['demofooternav'] = $footernav;
	$return['item']['cube'] = !empty($return['item']['cube']) ? $return['item']['cube'] : $cube;
	$return['item']['footernav']=$return['item']['footernav']?$return['item']['footernav']:$footernav;
	$htmls=array(
		'type'=>'edit',
		'desc'=>'参数设置',
		'tabs'=>$tabs,
		'edit_tab'=>true,
		'edits'=>array(
			array(
				'title'=>'基本信息',
				'list'=>array(
					array('type'=>'tip','title'=>'【温馨提示】：底部公司署名：是在站点设置--关于我们--公司名称！'),
					array('type'=>'string','title'=>'网站名称','name'=>'title'),
					array('type'=>'image','title'=>'网站logo','name'=>'logo','help'=>'建议尺寸：高68px*宽68px'),
					array('type'=>'string','title'=>'站点描述','name'=>'desc', 'help'=>'' ),
					array('type'=>'string','title'=>'安全密码','name'=>'password','help'=>'用户设置佣金时的密码口令'),
					array('type'=>'string','title'=>'站点关键字','name'=>'keywords', 'help'=>'' ),
					array('type'=>'text','title'=>'第三方统计代码','name'=>'code' ),
					array('type'=>'string','title'=>'分享标题','name'=>'share_title'),
					array('type'=>'image','title'=>'分享图片','name'=>'share_image','help'=>'建议尺寸：380*280'),
					array('type'=>'string','title'=>'分享描述','name'=>'share_desc'),
				)
			),
			array(
					'title'=>'参拍规则',
					'list'=>array(
						array('type'=>'switch','title'=>'实名参怕？','name'=>'idcard_check','help'=>'开启后，实名后用户才能参怕！'),
						array('type'=>'switch','title'=>'绑定手机号才能参拍？','name'=>'need_mobile','help'=>'开启后，绑定手机号才能参怕！'),
					)
			),
			array(
				'title'=>'底部导航',
					'list'=>array(
									array('type'=>'updemo','name'=>'footernav','demo'=>'demofooternav','title'=>'重置导航','help'=>'不知道添加什么导航？重置默认的一下试试！'),
									array('type'=>'array','name'=>'footernav','add_tip'=>'添加一个底部导航',
									'list'=>array(
										array('type'=>'string','name'=>'title','title'=>'导航名称'),
										array('type'=>'icon','name'=>'icon','from'=>'jinyunicon','title'=>'导航图标'),
										array('type'=>'string','name'=>'action','title'=>'导航链接'),							
									),
									'details'=>array(
										array('type'=>'string','name'=>'title','title'=>'导航名称'),
										array('type'=>'icon','name'=>'icon','from'=>'jinyunicon','title'=>'导航图标'),							
										array('type'=>'string','name'=>'action','from'=>'action','title'=>'导航链接'),
									)
								),
					)
			),
			array(
					'title'=>'魔方设置',
					'list'=>array(
						array('type'=>'array','name'=>'cube','add_tip'=>'添加一个魔方',
								'list'=>array(
									array('type'=>'image','name'=>'image','title'=>'图片'),	
									array('type'=>'string','name'=>'url','title'=>'链接'),
								),
								'details'=>array(
									array('type'=>'image','name'=>'image','title'=>'图片'),
									array('type'=>'link','from'=>'action','name'=>'url','title'=>'链接'),
								)
						),
					)
			),
			array(
					'title'=>'系统颜色',
					'list'=>array(
						array('type'=>'colorpicker','title'=>'系统颜色','name'=>'syscolor','help'=>'自定义系统颜色系，默认： #00c568'),
						array('type'=>'colorpicker','title'=>'悬停颜色','name'=>'hovercolor','help'=>'自定义悬停颜色系，默认： #32CD32'),
						array('type'=>'colorpicker','title'=>'列表状态颜色','name'=>'statuscolor','help'=>'列表状态颜色系，默认： #f60'),
					)
			),
			array(
					'title'=>'内容设置',
					'list'=>array(
						array('type'=>'choose','title'=>'注册协议ID','name'=>'zhuceid','op'=>'choosenews','choose_title'=>'选择文章'),
						array('type'=>'choose','title'=>'服务协议ID','name'=>'fuwuid','op'=>'choosenews','choose_title'=>'选择文章'),
						array('type'=>'choose','title'=>'卖家承诺ID','name'=>'promiseid','op'=>'choosenews','choose_title'=>'选择文章'),
						array('type'=>'choose','title'=>'竞拍须知ID','name'=>'xuzhiid','op'=>'choosenews','choose_title'=>'选择文章'),
						array('type'=>'choose','title'=>'规则介绍ID','name'=>'guizeid','op'=>'choosenews','choose_title'=>'选择文章'),
						array('type'=>'choose','title'=>'关于我们ID','name'=>'aboutid','op'=>'choosenews','choose_title'=>'选择文章'),
					)
			),
		),
	);
	
	$return['htmls']=$htmls;
	exi($return);
}
if($_RQ['op']=='lianxi'){
		$pluginset=$this->plugin_setting('basic');
		if($_RQ['postdata']){
			$postdata=get_postdata();
			$this->plugin_setting('basic',$postdata);
			exi('设置成功');
		}
		$return['item']=$pluginset;
		$htmls=array(
		'type'=>'edit',
		'desc'=>'联系方式',
		'edit'=>array(
									array('type'=>'string','title'=>'客服链接','name'=>'kflink' ),
									array('type'=>'string','title'=>'联系人','name'=>'lxr' ),
									array('type'=>'string','title'=>'客服电话','name'=>'phone' ),
									array('type'=>'string','title'=>'维权热线','name'=>'backphone' ),
									array('type'=>'string','title'=>'平台客服QQ','name'=>'qq' ),
									array('type'=>'string','title'=>'拍品客服QQ','name'=>'paiqq' ),
									array('type'=>'string','title'=>'邮箱','name'=>'mail' ),
									array('type'=>'string','title'=>'公司名称','name'=>'cname' ),
									array('type'=>'string','title'=>'ICP备案号','name'=>'icp' ),
									array('type'=>'text','title'=>'关于我们','name'=>'about' ),
									array('type'=>'text','title'=>'企业文化','name'=>'culture' ),
									array('type'=>'text','title'=>'加入我们','name'=>'join' ),
									array('type'=>'string','title'=>'详细地址','name'=>'address' ),
									array('type'=>'lat_lng','title'=>'地理位置','name'=>'naddress' ),
			)
		);
		$return['htmls']=$htmls;
		exi($return);
}
if($_RQ['op']=='hdp'){
		$pluginset=$this->plugin_setting('basic');
		if($_RQ['postdata']){
			$postdata=get_postdata();
			$this->plugin_setting('basic',$postdata);
			exi('设置成功');
		}
		$return['item']=$pluginset;
		$htmls=array(
		'type'=>'edit',
		'desc'=>'PC幻灯片',
		'edit'=>array(
					array(
							'type'=>'array',
							'name'=>'hdps',
							'add_tip'=>'添加一个幻灯片',
								'list'=>array(
									array('type'=>'image','name'=>'picurl','title'=>'幻灯片图片'),
									array('type'=>'string','name'=>'url','title'=>'幻灯片链接'),
									
								),
								'details'=>array(
									array('type'=>'image','name'=>'picurl','title'=>'幻灯片图片','help'=>'尺寸参考：1900-445'),
									array('type'=>'string','name'=>'url','title'=>'幻灯片链接'),
									
								)
						)
			)
		);
		$return['htmls']=$htmls;
		exi($return);
}
if($_RQ['op']=='apphdp'){
		$pluginset=$this->plugin_setting('basic');
		if($_RQ['postdata']){
			$postdata=get_postdata();
			$this->plugin_setting('basic',$postdata);
			exi('设置成功');
		}
		$return['item']=$pluginset;
		$htmls=array(
		'type'=>'edit',
		'desc'=>'手机幻灯片',
		'edit'=>array(
					array(
							'type'=>'array',
							'name'=>'mobilehdps',
							'add_tip'=>'添加一个幻灯片',
								'list'=>array(
									array('type'=>'image','name'=>'picurl','title'=>'幻灯片图片'),
									array('type'=>'string','name'=>'url','title'=>'幻灯片链接'),
									
								),
								'details'=>array(
									array('type'=>'image','name'=>'picurl','title'=>'幻灯片图片','help'=>'尺寸参考：640-320，幻灯片高度是根据图片高度比例来展示的。'),
									array('type'=>'string','name'=>'url','title'=>'幻灯片链接'),
									
								)
						)
			)
		);
		$return['htmls']=$htmls;
		exi($return);
}
if($_RQ['op']=='bankuai'){
		$pluginset=$this->plugin_setting('basic');
		if($_RQ['postdata']){
			$postdata=get_postdata();
			$this->plugin_setting('basic',$postdata);
			exi('设置成功');
		}
		$return['item']=$pluginset;
		$bankuai1 =array(
			array('title'=>'热拍专场','img'=>'../addons/jy_jdpm/resource/images/mobile/cate-pai.png','action'=>'jy_jdpm/goodslist//ishot=1'),
			array('title'=>'预展专区','img'=>'../addons/jy_jdpm/resource/images/mobile/cate-cj.png','action'=>'jy_jdpm/special.index//'),
			array('title'=>'精品赏析','img'=>'../addons/jy_jdpm/resource/images/mobile/cate-qiu.png','action'=>'jy_jdpm/goodslist/'),
			array('title'=>'限时拍卖','img'=>'../addons/jy_jdpm/resource/images/mobile/cate-xian.png','action'=>'jy_jdpm/goodslist/'),
		);
		$return['item']['bankuai1'] =  !empty($return['item']['bankuai1']) ? $return['item']['bankuai1'] : $bankuai1;
		$return['item']['plugins']=$return['item']['plugins']?$return['item']['plugins']:$plugins[1]['list'];
		$htmls=array(
		'type'=>'edit',
		'desc'=>'板块导航',
		'edit'=>array(
					array('type'=>'array','name'=>'bankuai1','add_tip'=>'添加一个板块导航',
									'list'=>array(
										array('type'=>'string','name'=>'title','title'=>'导航名称'),
										array('type'=>'image','name'=>'img','title'=>'导航图片'),
										array('type'=>'string','name'=>'action','title'=>'导航链接'),							
									),
									'details'=>array(
										array('type'=>'string','name'=>'title','title'=>'导航名称'),
										array('type'=>'image','name'=>'img','title'=>'导航图片'),							
										array('type'=>'string','name'=>'action','title'=>'导航链接'),
									)
								),
			)
		);
		$return['htmls']=$htmls;
		exi($return);
}
if($_RQ['op']=='yongjin'){
	$basic=$this->plugin_setting('basic');
	if($_RQ['postdata']){
			$postdata=get_postdata();
			$postdata['onsetbi']=intval($postdata['onsetbi']);
			$postdata['losetime1']=floatval($postdata['losetime1']);
			$postdata['losegetgoodstime']=intval($postdata['losegetgoodstime']);
			$postdata['w_mid']=floatval($postdata['w_mid']);
			$postdata['w_merchid']=floatval($postdata['w_merchid']);
			$postdata['w_system']=floatval($postdata['w_system']);
			$postdata['w_agent']=floatval($postdata['w_agent']);
			$postdata['jpuser']=floatval($postdata['jpuser']);
			$postdata['mid']=floatval($postdata['mid']);
			$postdata['merchid']=floatval($postdata['merchid']);
			$postdata['system']=floatval($postdata['system']);
			$postdata['agent']=floatval($postdata['agent']);
			$postdata['fuwufee']=floatval($postdata['fuwufee']);
			$postdata['guapaifee']=floatval($postdata['guapaifee']);
			if($postdata['password'] != $basic['password']){
				exi('安全密码错误不允许操作！','error');
			}
			unset($postdata['password']);
			if(!is_int($postdata['onsetbi'])){
				exi('保证金-起拍比例,必须是整数','error');
			}
			if(!is_float($postdata['losetime1'])){
				exi('买家支付期限(小时)，必须是整数或布尔型','error');
			}
			if(!is_int($postdata['losegetgoodstime'])){
				exi('买家收货期限','error');
			}
			if(!is_float($postdata['w_mid'])){
				exi('送拍商所得，必须是整数或布尔型','error');
			}
			if(!is_float($postdata['w_merchid'])){
				exi('送拍人所得，必须是整数或布尔型','error');
			}
			if(!is_float($postdata['w_system'])){
				exi('平台所得，必须是整数或布尔型','error');
			}
			if(!is_float($postdata['w_agent'])){
				exi('平台经纪人，必须是整数或布尔型','error');
			}
			if(!is_float($postdata['jpuser'])){
				exi('竞拍人所得，必须是整数或布尔型','error');
			}
			if(!is_float($postdata['mid'])){
				exi('送拍商所得，必须是整数或布尔型','error');
			}
			if(!is_float($postdata['merchid'])){
				exi('送拍人所得，必须是整数或布尔型','error');
			}
			if(!is_float($postdata['system'])){
				exi('平台所得，必须是整数或布尔型','error');
			}
			if(!is_float($postdata['agent'])){
				exi('平台经纪人，必须是整数或布尔型','error');
			}
			if(!is_float($postdata['fuwufee'])){
				exi('服务费，必须是整数或布尔型','error');
			}
			if(!is_float($postdata['guapaifee'])){
				exi('挂牌手续费，必须是整数或布尔型','error');
			}
			if(($postdata['w_mid'] + $postdata['w_merchid'] + $postdata['w_system'] +$postdata['w_agent'] + $postdata['w_jpuser']) >1){
				exi('违约比率之和不能大于1','error');
			}
			if(($postdata['mid'] + $postdata['merchid'] + $postdata['system'] +$postdata['agent'] + $postdata['jpuser'] + $postdata['fuwufee'] + $postdata['guapaifee']) >1){
				exi('成交比率之和不能大于1','error');
			}
			$this->plugin_setting('order',$postdata);
			exi('设置成功');
	}
	$item=$this->plugin_setting('order');
	$htmls=array(
		'type'=>'edit',
		'desc'=>'订单佣金配置',
		'edits'=>array(
			array(
					'title'=>'订单交易设置',
					'list'=>array(
						array('type'=>'password','title'=>'安全密码','name'=>'password','help'=>'为了安全，必须验证密码才能设置修改！'),
						array('name'=>'onsetbi','title'=>'保证金-起拍最大比例设置(倍数)','type'=>'string','help'=>' 默认是：3倍；即：当拍卖价格大于起拍价的3倍时：保证金将按实际价格计算，否则按比例计算'),
						array('type'=>'string','title'=>'买家支付期限(小时)','name'=>'losetime1','help'=>'订单生成后，买家的支付期限。如果过期将扣除买家保证金，扣除佣金后自动转入卖家账户。'),
						array('name'=>'endtime','title'=>'自动完成期限(天)','type'=>'string','help'=>' 确认收货后。将自动完成。'),
					)
			),
			array(
					'title'=>'违约比率设置',
					'list'=>array(
						array('name'=>'w_mid','title'=>'送拍商所得','type'=>'string','help'=>'违约保证金×8%;例如：0.08'),
						array('name'=>'w_merchid','title'=>'送拍人所得','type'=>'string','help'=>'违约保证金×20%;例如：0.2'),
						array('type'=>'string','title'=>'平台所得','name'=>'w_system','help'=>'违约保证金×40%;例如：0.4'),
						array('name'=>'w_agent','title'=>'平台经纪人','type'=>'string','help'=>'违约保证金×2%/（总竞拍次数-1）；成交人除外，没有经纪人的收益算入平台中；首拍违约，无有效竞拍人，没有经纪人所得收益'),
						array('name'=>'w_jpuser','title'=>'竞拍人所得','type'=>'string','help'=>'违约保证金×30%/（总竞拍次数-1）成交人除外；首拍违约时，无竞拍人所得'),
					)
			),
			array(
					'title'=>'成交比率设置',
					'list'=>array(
						array('name'=>'mid','title'=>'送拍商所得','type'=>'string','help'=>'（成交价-起拍价）×8%；比例：0.08'),
						array('name'=>'merchid','title'=>'送拍人所得','type'=>'string','help'=>'起拍价+（成交价-起拍价）×50%-挂牌手续费-服务费；比例：0.5'),
						array('type'=>'string','title'=>'平台所得','name'=>'system','help'=>'成交价-送拍商所得-挂牌手续费-平台经纪人所有人所得-全部有效竞拍人所得-送拍人所得-服务费；用总额减去其他所有人所得，剩余是平台所得'),
						array('name'=>'agent','title'=>'平台经纪人','type'=>'string','help'=>'(成交价-起拍价)×2%/（总竞拍次数-1）;（成交人除外，不参与收益分配，如无推荐人归平台所有）'),
						array('name'=>'jpuser','title'=>'竞拍人所得','type'=>'string','help'=>'（成交价-起拍价）×30%/（总竞拍次数-1）；（成交人除外，不参与收益分配）'),
						array('name'=>'fuwufee','title'=>'服务费','type'=>'string','help'=>'成交价×1%'),
						array('name'=>'guapaifee','title'=>'挂牌手续费','type'=>'string','help'=>'起拍价×2%'),
					)
			),
		)
	);
	
	$return['htmls']=$htmls;
	$return['item']=$item;
	exi($return);
}
if($_RQ['op']=='jifen'){
		$pluginset=$this->plugin_setting('basic');
		if($_RQ['postdata']){
			$postdata=get_postdata();
			$this->plugin_setting('basic',$postdata);
			exi('设置成功');
		}
		$return['item']=$pluginset;
		$htmls=array(
		'type'=>'edit',
		'desc'=>'积分设置',
		'edit'=>array(
					array('type'=>'string','name'=>'login','title'=>'登录赠送积分','help'=>'不填默认10积分'),
							array('type'=>'string','name'=>'reg','title'=>'邀请注册赠送积分','help'=>'不填默认30积分'),
							array('type'=>'string','name'=>'auction','title'=>'参拍奖励积分','help'=>'自己参与竞拍获取的奖励'),
							array('type'=>'string','name'=>'share','title'=>'分享拍品奖励积分','help'=>'分享出去他人拍卖成功后，获得奖励'),
							array('type'=>'string','name'=>'sharemax','title'=>'每天分享拍品最高奖励次数','help'=>'不填默认3次'),
							array('type'=>'string','name'=>'firstend','title'=>'首尾拍奖励积分（%）','help'=>'填写百分比数字，不填默认拍卖金额的2%'),
			)
		);
		$return['htmls']=$htmls;
		exi($return);
}
if($_RQ['op']=='fenxiao'){
	$item=$this->plugin_setting('commission');
	if($_RQ['postdata']){
			$postdata=get_postdata();
			$this->plugin_setting('commission',$postdata);
			exi('设置成功');
		}
	$htmls=array(
		'type'=>'edit',
		'desc'=>'分销设置',
		
		'edit'=>array(
			array('name'=>'status','title'=>'是否开启分销','type'=>'radio','options'=>'status'),
			array('name'=>'commission','title'=>'分销比例(%)','type'=>'string','help'=>'默认为2，即2%（注：平台所得佣金的比例+分销佣金比例=40%)'),
		)
	);
	$return['status']=array('0'=>'关闭','1'=>'开启');
	$return['htmls']=$htmls;
	$return['item']=$item;
	exi($return);
}
if($_RQ['op']=='hezuo'){
		$pluginset=$this->plugin_setting('basic');
		if($_RQ['postdata']){
			$postdata=get_postdata();
			$this->plugin_setting('basic',$postdata);
			exi('设置成功');
		}
		$return['item']=$pluginset;
		$htmls=array(
		'type'=>'edit',
		'desc'=>'合作机构',
		'edit'=>array(
					array('type'=>'array','name'=>'hezuos','add_tip'=>'添加一个合作',
									'list'=>array(
										array('type'=>'string','name'=>'title','title'=>'公司名称'),
										array('type'=>'image','name'=>'picurl','title'=>'公司图标'),
										array('type'=>'string','name'=>'url','title'=>'链接地址'),							
									),
									'details'=>array(
										array('type'=>'string','name'=>'title','title'=>'公司名称'),
										array('type'=>'image','name'=>'picurl','title'=>'公司图标'),
										array('type'=>'string','name'=>'url','title'=>'链接地址'),	
									)
								),
			)
		);
		$return['htmls']=$htmls;
		exi($return);
}
if($_RQ['op']=='links'){
		$pluginset=$this->plugin_setting('basic');
		if($_RQ['postdata']){
			$postdata=get_postdata();
			$this->plugin_setting('basic',$postdata);
			exi('设置成功');
		}
		$return['item']=$pluginset;
		$htmls=array(
		'type'=>'edit',
		'desc'=>'友情链接',
		'edit'=>array(
					array('type'=>'array','name'=>'youlinks','add_tip'=>'添加一个友情链接',
									'list'=>array(
										array('type'=>'string','name'=>'title','title'=>'链接名称'),
										array('type'=>'image','name'=>'picurl','title'=>'链接图标'),
										array('type'=>'string','name'=>'url','title'=>'链接地址'),							
									),
									'details'=>array(
										array('type'=>'string','name'=>'title','title'=>'链接名称'),
										array('type'=>'image','name'=>'picurl','title'=>'链接图标'),
										array('type'=>'string','name'=>'url','title'=>'链接地址'),	
									)
								),
			)
		);
		$return['htmls']=$htmls;
		exi($return);
}
if($_RQ['op']=='orad'){
		$pluginset=$this->plugin_setting('basic');
		if($_RQ['postdata']){
			$postdata=get_postdata();
			$this->plugin_setting('basic',$postdata);
			exi('设置成功');
		}
		$return['item']=$pluginset;
		$htmls=array(
		'type'=>'edit',
		'desc'=>'其他广告',
		'edit'=>array(
					array('type'=>'image','title'=>'登陆页背景图','name'=>'lg_bg'),
					array('type'=>'string','title'=>'登陆页背景图url','name'=>'lg_bgurl'),
					array('type'=>'image','title'=>'全部分类-为你推荐','name'=>'nav_tuijie', 'help'=>'' ),
					array('type'=>'string','title'=>'全部分类-为你推荐url','name'=>'nav_tuijieurl', 'help'=>'' ),
					array('type'=>'image','title'=>'拍卖会标题处','name'=>'paimai_title'),
					array('type'=>'string','title'=>'拍卖会标题处url','name'=>'paimai_titleurl'),
					array('type'=>'image','title'=>'头条底部','name'=>'toutiao_footer'),
					array('type'=>'string','title'=>'头条底部url','name'=>'toutiao_footerurl'),
					array('type'=>'image','title'=>'首页底部','name'=>'index_footer'),
					array('type'=>'string','title'=>'首页底部url','name'=>'index_footerurl'),
			)
		);
		$return['htmls']=$htmls;
		exi($return);
}
/**关于我们**/
if($_RQ['op']=='abouts'){
		$pluginset=$this->plugin_setting('abouts');
		if($_RQ['postdata']){
			$postdata=get_postdata();
			$this->plugin_setting('abouts',$postdata);
			exi('设置成功');
		}
		$return['item']=$pluginset;
		$htmls=array(
		'type'=>'edit',
		'desc'=>'关于我们',
		'edit'=>array(
					array('type'=>'richtext','title'=>'关于我们','name'=>'content'),
			)
		);
		$return['htmls']=$htmls;
		exi($return);
}
/**规则介绍**/
if($_RQ['op']=='guize'){
		$pluginset=$this->plugin_setting('guize');
		if($_RQ['postdata']){
			$postdata=get_postdata();
			$this->plugin_setting('guize',$postdata);
			exi('设置成功');
		}
		$return['item']=$pluginset;
		$htmls=array(
		'type'=>'edit',
		'desc'=>'规则介绍',
		'edit'=>array(
					array('type'=>'richtext','title'=>'规则介绍','name'=>'content'),
			)
		);
		$return['htmls']=$htmls;
		exi($return);
}
/**卖家承诺**/
if($_RQ['op']=='promise'){
		$pluginset=$this->plugin_setting('promise');
		if($_RQ['postdata']){
			$postdata=get_postdata();
			$this->plugin_setting('promise',$postdata);
			exi('设置成功');
		}
		$return['item']=$pluginset;
		$htmls=array(
		'type'=>'edit',
		'desc'=>'卖家承诺',
		'edit'=>array(
					array('type'=>'richtext','title'=>'卖家承诺','name'=>'content'),
			)
		);
		$return['htmls']=$htmls;
		exi($return);
}
/**竞拍须知**/
if($_RQ['op']=='notice'){
		$pluginset=$this->plugin_setting('notice');
		if($_RQ['postdata']){
			$postdata=get_postdata();
			$this->plugin_setting('notice',$postdata);
			exi('设置成功');
		}
		$return['item']=$pluginset;
		$htmls=array(
		'type'=>'edit',
		'desc'=>'竞拍须知',
		'edit'=>array(
					array('type'=>'richtext','title'=>'竞拍须知','name'=>'content'),
			)
		);
		$return['htmls']=$htmls;
		exi($return);
}
if($_RQ['op']=='chooseplugins'){
	$list = pdo_getall('core_plugins',array('hide'=>0),array('id','style','name','title','image','description'),'id');
	if($list){
		foreach($list as $k=>&$item){
			if(!check_permission($item['name'])){
				unset($list[$k]);
			}else{
				$item['plugininfo'] = array('name'=>$item['name'],'title'=>$item['title'],'description'=>$item['description']);
			}
			
		}
	}
	$return['list']=$list;
	$return['htmls']=array(
		'type'=>'list',
		'list'=>array('data'=>'list','edit'=>false,'delall'=>false,'del_one'=>false,'pagelist'=>false,'list'=>array(
			array('name'=>'title','title'=>'名称','type'=>'string'),
		),'action'=>array(
			array('type'=>'modal_result','name'=>'name','title'=>'选取'),
		)),
		'search_one'=>array('name'=>'title','add'=>false),
	);
	exi($return);
}
if($_RQ['op']=='choosenews'){
	$pindex = max(1, intval($_RQ['page']));
	$psize = 10;
	$return['params']=$params=array('uniacid'=>$_SESSION['uniacid'],);
	//$params=array('uniacid'=>$_SESSION['uniacid']);
	if($_RQ['title']){
		$params['title like']='%'.$_RQ['title'].'%';
		$return['params']['title']=$_RQ['title'];
	}
	$list=pdo_getslice('core_account_article',$params,array($pindex,$psize),$total,array('id','title'),'','id desc');
	$return['list']=$list;
	$totalpage=ceil($total/$psize);
	$totalpage=intval($totalpage);
	$return['totalpage'] =$totalpage;
	$return['params']['page'] =$pindex;
	$return['htmls']=array(
		'type'=>'list',
		'list'=>array('data'=>'list','edit'=>false,'delall'=>false,'del_one'=>false,'pagelist'=>false,'list'=>array(
			array('name'=>'title','title'=>'文章标题','type'=>'string'),
		),'action'=>array(
			array('type'=>'modal_result','name'=>'id','title'=>'选取'),
		)),
		'search_one'=>array('name'=>'title','add'=>false),
	);
	exi($return);
}

